<form nz-form [formGroup]="form" (ngSubmit)="submit()" role="form" class="bg-white p-md rounded-md">
    <nz-tabset [nzAnimated]="false" class="tabs" (nzSelectChange)="switch($event)">
        <nz-tab [nzTitle]="'欢迎登录'">
            <nz-alert *ngIf="error" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg"></nz-alert>
            <nz-form-item>
                <nz-form-control [nzErrorTip]="'请输入用户名!'">
                    <nz-input-group nzSize="large" nzPrefixIcon="user">
                        <input autocomplete="off" nz-input formControlName="userName" placeholder="用户名" />
                    </nz-input-group>
                </nz-form-control>
            </nz-form-item>
            <nz-form-item>
                <nz-form-control nzErrorTip="请输入密码!">
                    <nz-input-group nzSize="large" nzPrefixIcon="lock">
                        <input autocomplete="off" nz-input type="password" formControlName="password" placeholder="密码" />
                    </nz-input-group>
                </nz-form-control>
            </nz-form-item>
        </nz-tab>
    </nz-tabset>
    <nz-form-item>
        <button nz-button type="submit" nzType="primary" nzSize="large" [nzLoading]="http.loading" nzBlock>
      登录
    </button>
    </nz-form-item>
</form>
